.TH std::basic_filebuf::~basic_filebuf 3 "2024.06.10" "http://cppreference.com" "C++ Standard Libary"
.SH NAME
std::basic_filebuf::~basic_filebuf \- std::basic_filebuf::~basic_filebuf

.SH Synopsis

   virtual ~basic_filebuf();

   Calls close() to close the associated file and destructs all other members of
   basic_filebuf. If an exception occurs during the destruction of the object,
   including the call to close(), it is caught and not rethrown.

.SH Parameters

   \fI(none)\fP

.SH Return value

   \fI(none)\fP

.SH Notes

   Typically called by the destructor of std::basic_fstream.

.SH Example

    This section is incomplete
    Reason: no example

   Defect reports

   The following behavior-changing defect reports were applied retroactively to
   previously published C++ standards.

     DR    Applied to            Behavior as published               Correct behavior
   LWG 622 C++98      it was unclear how to handle the exception   it is caught but not
                      thrown during destruction                    rethrown

.SH See also

   constructor   constructs a basic_filebuf object
                 \fI(public member function)\fP
   close         flushes the put area buffer and closes the associated file
                 \fI(public member function)\fP

.SH Category:
     * Todo no example
